package phone.qyg.com.qyg.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.app.application.QXApplication;
import com.app.base.tool.BaseActivity;
import com.app.utils.TransformController;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;

import phone.qyg.com.qyg.R;
import phone.qyg.com.qyg.model.Third;


/**
 * 作者：lblbh on 2017/5/18 15:26
 * 邮箱：lanbuhan@163.com
 * 功能：第三方账号 选择账号绑定
 */
@ContentView(R.layout.third_party)
public class ThirdPartySelectActivity extends BaseActivity {

    @ViewInject(R.id.back)
    TextView back;

    @ViewInject(R.id.one)
    TextView one;

    @ViewInject(R.id.two)
    TextView two;

    Third third;

    @Override
    public void initSucessView() {
        third = (Third) getTransModels();
    }

    @Event(value = {R.id.back,R.id.one,R.id.two})
    private void viewOnClick(View v){
        switch (v.getId()){
            case R.id.back:
                this.finish();
                break;
            case R.id.one:
                //“bind_type”:  1    //绑定类型：1-已有用户绑定，2-新用户注册
                third.bind_type = 1;
                TransformController.transformControllerModel(QXApplication.getContext(),ThirdOneActivity.class,third);
                break;
            case R.id.two:
                third.bind_type = 2;
                TransformController.transformControllerModel(QXApplication.getContext(),ThirdTwoActivity.class,third);
                break;
        }
    }

    @Override
    public void initData(Bundle savedInstanceState) {}

    @Override
    public void initViewHandler() {}
}
